﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ForumDomainModels.Mappers
{
    public class CategoryMapper
    {
        public ForumDomainModels.Category DataFromDatabaseToCategoryDomainModel(SqlDataReader reader)
        {
            ForumDomainModels.Category currentCategory = new ForumDomainModels.Category();
            currentCategory.Id = (int)reader["Id"];
            currentCategory.CategoryName = (string)reader["CategoryName"];
            currentCategory.Description = (string)reader["Description"];
            currentCategory.SectionId = (int)reader["SectionId"];
            return currentCategory;
        }
    }
}
